<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../js/vue.js"></script>
    
</head>

<body>
    <div id="demo">
        <div style="width:100px;height:100px;border:1px solid red;background:red;">原生行内 字符串</div>
        <hr>
        <div :style="str">字符串</div>
        <hr>
        <div :style="obj">对象</div>
        <hr>
        <div :style="arr">数组</div>
    </div>
    <script>
        /**
         * style:
         * 1. 字符串：
         * 2. 对象[推荐]：
         * 3. 数组【了解】
         * 
         */
        Vue.config.productionTip = false
        new Vue({
            el: '#demo',
            data: {
                str:'width:100px;height:100px;border:1px solid red;background:red;',
                obj:{
                    width:'100px',
                    height:'100px',
                    border:'1px solid red'
                },
                arr:[
                    {
                        width:'100px'
                    },
                    {
                        height:'100px',
                        border:'1px solid red'
                    }
                ]
            }
        })
    </script>
</body>

</html>